package com.smsc.headend.task.engine.service.push;

import com.smsc.headend.module.event.dto.DeviceNotificationDto;
import com.smsc.headend.module.event.entity.RdEventDcu;
import com.smsc.headend.module.event.entity.RdEventMeter;
import com.smsc.headend.module.protocol.cosem.bo.CosemData;
import com.smsc.headend.module.task.dto.Task;

import java.util.Date;
import java.util.List;

/**
 * 事件处理接口
 * @author liangli
 * @date 2020/11/2
 */
public interface EventService {
    void analyseCOSEMEvent(CosemData cosemData, Long modelId, Long deviceType, Long deviceId, Long dataItemId);

    void analyseBPDBCOSEMEvent(CosemData cosemData, Long modelId, Long deviceType, Long deviceId, Long dataItemId);

    void processBPDBNotification(Long modelId, Long deviceType, Long deviceId, Long dataItemId, Date uploadDate, Integer eventCode, CosemData notificationDataValue, DeviceNotificationDto notificationItemList);

    Integer getTaskEventType(Task task, Integer eventCode, Long lbDataItemId, Long deviceTypeId);

    String getEventName(Long eventTypeId);

    boolean batchInsertEvent(List<RdEventMeter> readsLps);

    boolean batchInsertDcuEvent(List<RdEventDcu> readsLps);
}
